/**
 *
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2023-11-20
 * Time: 15:28
 */
import java.util.Scanner;
public class test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String s =sc.nextLine();
            int len =s.substring(s.lastIndexOf(' ')+1,s.length()).length();
            System.out.println(len);
        }
        sc.close();

    }
}
